Pricing Power¶

Automated Analysis of Pricing Power Narratives and Competitive Positioning¶

Why It Matters¶

A company's ability to control prices is a crucial indicator of competitive moat and market position, but systematically evaluating pricing power across scattered news coverage, earnings calls, and filings is resource-intensive and inefficient. Investment decisions need systematic analysis of pricing dynamics to identify companies with sustainable competitive advantages.

What It Does¶

Using the functions available in the bigdata-research-tools package, you can create a comprehensive pricing power analysis tool that assesses competitive positioning across company watchlists using unstructured data from news sources. These functions are suitable for analysts, portfolio managers, and investment professionals to create tools that transform scattered pricing signals into quantified competitive intelligence and identify investment opportunities based on sustainable pricing advantages.

How It Works¶

The NarrativeMiner combines dual-theme sentiment analysis, temporal tracking, and confidence-based scoring to deliver:

  • Positive vs. negative pricing power assessment measuring both pricing strength and competitive pressure signals
  • Sector-wide comparative analysis revealing industry patterns and competitive positioning dynamics
  • Temporal evolution tracking showing how pricing narratives develop and change over time
  • Confidence scoring system quantifying the balance between positive and negative pricing power mentions

A Real-World Use Case¶

This cookbook demonstrates the complete workflow through analyzing pricing power dynamics across a company watchlist using news data, showing how the miner automatically identifies pricing leaders, tracks competitive positioning changes over time, and reveals sector-specific pricing patterns through automated narrative analysis.

Setup and Imports¶

Async Compatibility Setup¶

Run this cell first - Required for Google Colab, Jupyter Notebooks, and VS Code with Jupyter extension:

Why is this needed?¶

Interactive environments (Colab, Jupyter) already have an asyncio event loop running. When bigdata-research-tools makes async API calls (like to OpenAI), you'll get this error without nest_asyncio:

RuntimeError: asyncio.run() cannot be called from a running event loop

The nest_asyncio.apply() command patches this to allow nested event loops.

💡 Tip: If you're unsure which environment you're in, just run the cell below - it won't hurt in any environment!

In [3]:
import datetime
start = datetime.datetime.now()
In [4]:
try:
    import asyncio
    asyncio.get_running_loop()
    import nest_asyncio; nest_asyncio.apply()
    print("✅ nest_asyncio applied")
except (RuntimeError, ImportError):
    print("✅ nest_asyncio not needed")
✅ nest_asyncio applied

Environment Setup¶

The following cell configures the necessary path for the analysis

In [5]:
import os
import sys


current_dir = os.getcwd()
if current_dir not in sys.path:
    sys.path.append(current_dir)
print(f"✅ Local environment setup complete")
✅ Local environment setup complete

Import Required Libraries¶

Below is the Python code required for setting up our environment and importing necessary libraries.

In [6]:
from logging import Logger, getLogger
from typing import Dict, List, Optional

import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
from matplotlib.colors import LinearSegmentedColormap
import numpy as np
import pandas as pd
from pandas import DataFrame, merge
import seaborn as sns

from src.tool import plot_top_companies_by_sector, identify_basket_and_plot_confidence, analyze_basket_weekly_with_labels

from bigdata_client import Bigdata
from bigdata_client.models.entities import Company
from bigdata_client.models.search import DocumentType

from bigdata_research_tools.labeler.screener_labeler import ScreenerLabeler
from bigdata_research_tools.search.screener_search import search_by_companies
from bigdata_research_tools.excel import ExcelManager

Optional: Plotly Display Configuration¶

For better visualization rendering, you can also set the Plotly renderer:

In [37]:
import plotly.offline as pyo
from plotly.subplots import make_subplots
import plotly
import plotly.io as pio
import plotly.graph_objects as go

# Try to detect the environment and set appropriate renderer
try:
    # Check if we're in JupyterLab
    import os
    if 'JUPYTERHUB_SERVICE_PREFIX' in os.environ or 'JPY_SESSION_NAME' in os.environ:
        pio.renderers.default = 'jupyterlab'
        print("✅ Plotly configured for JupyterLab")
    else:
        # Default for VS Code, Jupyter Notebook, etc.
        pio.renderers.default = 'plotly_mimetype+notebook'
        print("✅ Plotly configured for Jupyter/VS Code")
except:
    # Fallback to a more universal renderer
    pio.renderers.default = 'notebook'
    print("✅ Plotly configured with fallback renderer")
✅ Plotly configured for Jupyter/VS Code

Define Output Paths¶

We define the output paths for our pricing power analysis results.

In [8]:
# Define output file paths for our results
output_dir = "output"
os.makedirs(output_dir, exist_ok=True)

export_path = f"{output_dir}/pricing_power_analysis_results.xlsx"

Load Credentials¶

In [9]:
from dotenv import load_dotenv
from pathlib import Path

script_dir = Path(__file__).parent if '__file__' in globals() else Path.cwd()
load_dotenv(script_dir / '.env')

BIGDATA_USERNAME = os.getenv('BIGDATA_USERNAME')
BIGDATA_PASSWORD = os.getenv('BIGDATA_PASSWORD')
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')


os.environ["BIGDATA_USERNAME"] = BIGDATA_USERNAME
os.environ["BIGDATA_PASSWORD"] = BIGDATA_PASSWORD
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY

if not all([BIGDATA_USERNAME, BIGDATA_PASSWORD, OPENAI_API_KEY]):
    print("❌ Missing required environment variables")
    raise ValueError("Missing required environment variables. Check your .env file.")
else:
    print("✅ Credentials loaded from .env file")
✅ Credentials loaded from .env file

Connecting to Bigdata¶

Create a Bigdata object with your credentials.

In [10]:
bigdata = Bigdata(BIGDATA_USERNAME, BIGDATA_PASSWORD)

Defining your Pricing Power Analysis Parameters¶

Fixed Parameters¶

  • Pricing Power Theme (pricing_power_theme): The central concept to explore for positive pricing power

  • Lack of Pricing Power Theme (no_pricing_power_theme): The concept to explore for negative pricing power

  • Pricing Power Sentences (pricing_power_sentences_list): Sentences used to improve the retrieval regarding the Pricing Power theme

  • Lacking of Pricing Power Sentences (no_pricing_power_sentences_list): Sentences used to improve the retrieval regarding the Lack of Pricing Power theme

  • Pricing Power Labels (pricing_power_labels_list): Labels used to recognize relevant document chucks for the Pricing Power theme

  • Lacking of Pricing Power Labels (no_pricing_power_labels_list): Labels used to recognize relevant document chucks for the Lack of Pricing Power theme

  • Document Type (document_type): Specify which documents to search over (transcripts, filings, news)

Customizable Parameters¶

  • Watchlist (my_watchlist_id): The set of companies to analyze. This is the ID of your watchlist in https://app.bigdata.com/watchlists

  • Model Selection (llm_model): The LLM model used to label search result document chunks and generate summaries

  • Frequency (freq): The frequency of the date ranges to search over. Supported values:

    • Y: Yearly intervals.
    • M: Monthly intervals.
    • W: Weekly intervals.
    • D: Daily intervals. Defaults to 3M.
  • Time Period (start_date and end_date): The date range over which to run the analysis

  • Document Sources (sources): Specify set of sources within a document type, for example which news outlets (available via Bigdata API) you wish to search over

  • Rerank Threshold (rerank_threshold): By setting this value, you're enabling the cross-encoder which reranks the results and selects those whose relevance is above the percentile you specify (0.7 being the 70th percentile). More information on the re-ranker can be found here.

  • Model Selection (llm_model): The LLM model used to label the search result chunks

  • Document Limit (document_limit): The maximum number of documents to return per query to Bigdata API

  • Batch Size (batch_size): The number of entities to include in a single batched query

In [11]:
# ===== Fixed Parameters =====

# Pricing Power Theme
pricing_power_theme = "Examples of pricing power for a company"

# Lack of Pricing Power Theme
no_pricing_power_theme = "Examples of lack of pricing power for a company"

# Sentences expressing positive pricing power narratives
pricing_power_sentences_list = [
    'Company has significant pricing power',
    'Firm can set higher prices without losing customers',
    'Organization can set prices above competitors',
    'Corporation can increase prices without affecting sales',
    'Firm can implement price hikes without losing clientele',
    'Business has the ability to control prices',
    'Enterprise can leverage pricing power',
    'Enterprise can sustain higher prices',
    'Business can charge premium prices',
    'Corporation can maintain high prices without losing customers',
    'Business can increase prices without affecting sales',
    'Company can elevate prices without a drop in demand',
    'Enterprise can adjust prices without losing market share',
    'Company can implement price hikes successfully',
    'Firm can raise prices without reducing demand',
    'Corporation can set prices independently',
    'Company can dictate prices in the market',
    'Company can manage prices without losing clients',
    'Organization can increase costs without reducing sales volume',
    'Organization can increase prices without customer backlash',
    'Corporation has the ability to set higher prices',
    'Business can set premium prices without losing customers',
    'Firm has the power to influence prices',
    'Business can control pricing strategy effectively',
    'Enterprise can adjust prices upwards without losing market share',
    'Organization can raise prices without demand impact',
    'Firm can adjust pricing without negative impact'
]

# Sentences expressing lack of pricing power narratives
no_pricing_power_sentences_list = [
    'Company has no pricing power',
    'Firm cannot set higher prices without losing customers',
    'Organization cannot set prices above competitors',
    'Corporation cannot increase prices without affecting sales',
    'Firm cannot implement price hikes without losing clientele',
    'Business lacks the ability to control prices',
    'Enterprise cannot leverage pricing power',
    'Enterprise cannot sustain higher prices',
    'Business cannot charge premium prices',
    'Corporation cannot maintain high prices without losing customers',
    'Business cannot increase prices without affecting sales',
    'Company cannot elevate prices without a drop in demand',
    'Enterprise cannot adjust prices without losing market share',
    'Company cannot implement price hikes successfully',
    'Firm cannot raise prices without reducing demand',
    'Corporation cannot set prices independently',
    'Company cannot dictate prices in the market',
    'Company cannot manage prices without losing clients',
    'Organization cannot increase costs without reducing sales volume',
    'Organization cannot increase prices without customer backlash',
    'Corporation has no ability to set higher prices',
    'Business cannot set premium prices without losing customers',
    'Firm has no power to influence prices',
    'Business cannot control pricing strategy effectively',
    'Enterprise cannot adjust prices upwards without losing market share',
    'Organization cannot raise prices without demand impact',
    'Firm cannot adjust pricing without negative impact'
]

# Labels to categorize pricing power related sentences
pricing_power_labels_list = [
    "Successful Price Increase",
    "Strong Brand Recognition",
    "Launch of Differentiated Product",
    "Customer Loyalty Confirmed",
    "Effective Cost Pass-Through",
    "Competitor Price Follow",
    "High Demand Despite Price Hike",
    "Monopoly or Legal Advantage Maintained",
    "Premium Market Position Reinforced",
    "Switching Costs Recognized by Market"
]

# Labels to categorize lack of pricing power related sentences
no_pricing_power_labels_list = [
    "Failed Price Increase",
    "Weak Brand Recognition",
    "Launch of Commoditized Product",
    "Customer Loyalty Lost",
    "Ineffective Cost Pass-Through",
    "Competitor Price Undercut",
    "Demand Drop After Price Hike",
    "Loss of Market Position",
    "Commodity Market Position",
    "Low Switching Costs",
    "Lack of Pricing Power",
    "Weak Pricing Control",
    "Limited Pricing Influence",
    "Poor Pricing Strategy",
    "No Pricing Authority"
]

# Document Configuration
document_type = DocumentType.NEWS
In [12]:
# ===== Customizable Parameters =====

# Company Universe (from Watchlist)
# We get Top US 100 watchlist from Bigdata.com
my_watchlist_id = "44118802-9104-4265-b97a-2e6d88d74893"
watchlist = bigdata.watchlists.get(my_watchlist_id)
companies = bigdata.knowledge_graph.get_entities(watchlist.items)

# Choose MT Newswires as a news source
sources = bigdata.knowledge_graph.find_sources("MT Newswires")
tech_news_ids = [source.id for source in sources if "MT Newswires" == source.name]

# LLM Specification
llm_model = "openai::gpt-4o-mini"

# Search Frequency
search_frequency='W'

# Enable/Disable Reranker
rerank_threshold = None

# Specify Time Range
start_date = "2024-01-01"
end_date = "2024-06-01"

# Document Limits
document_limit = 10

# Others
batch_size = 10

Retrieve Content using Bigdata's Search Capabilities¶

With the pricing power narratives and analysis parameters, you can leverage the Bigdata API to run a search on company news for both positive and negative pricing power indicators.

In [ ]:
df_sentences_positive = search_by_companies(
    companies=companies,
    sentences=pricing_power_sentences_list,
    start_date=start_date,
    end_date=end_date,
    scope=document_type,
    sources=tech_news_ids,
    rerank_threshold=rerank_threshold,
    freq=search_frequency,
    document_limit=document_limit,
    batch_size=batch_size,
)
Querying Bigdata...:   1%|          | 50/5670 [00:10<18:55,  4.95it/s]
In [ ]:
df_sentences_negative = search_by_companies(
    companies=companies,
    sentences=no_pricing_power_sentences_list,
    start_date=start_date,
    end_date=end_date,
    scope=document_type,
    sources=tech_news_ids,
    rerank_threshold=rerank_threshold,
    freq=search_frequency,
    document_limit=document_limit,
    batch_size=batch_size,
)
Querying Bigdata...: 100%|██████████| 5670/5670 [19:54<00:00,  4.75it/s]  
Processing news results...: 100%|██████████| 18587/18587 [00:02<00:00, 6587.11it/s]
In [ ]:
df_sentences_positive.head(5)
Out[ ]:
timestamp_utc document_id sentence_id headline entity_id document_type is_reporting_entity entity_name entity_sector entity_industry entity_country entity_ticker text other_entities entities masked_text other_entities_map
0 2024-01-08 11:25:18+00:00 35168FBB2BC7D51E333525D037E3B48C 35168FBB2BC7D51E333525D037E3B48C-1 Boeing Shares Tumble After Aviation Regulator ... 55438C news False Boeing Co. Industrials Aerospace United States BA 06:25 AM EST, 01/08/2024 (MT Newswires) -- Boe... Alaska Air Group Inc. [{'key': '55438C', 'name': 'Boeing Co.', 'tick... 06:25 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(1, Alaska Air Group Inc.)]
1 2024-01-08 12:23:22+00:00 23E2BED19BC492E6F8AC36949930D292 23E2BED19BC492E6F8AC36949930D292-1 KeyBanc Boosts Price Target on Mastercard to $... 55C9B5 news False Mastercard Inc. Financials Consumer Finance United States MA 07:23 AM EST, 01/08/2024 (MT Newswires) -- Mas... S&P Global Market Intelligence Inc. [{'key': '55C9B5', 'name': 'Mastercard Inc.', ... 07:23 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
2 2024-01-08 12:26:48+00:00 7856CE57B56A7ABDC3E1DBE3B9347B27 7856CE57B56A7ABDC3E1DBE3B9347B27-1 Seaport Boosts Price Target on Southern to $77... 147C38 news False Southern Co. Utilities Conventional Electricity United States SO 07:26 AM EST, 01/08/2024 (MT Newswires) -- Sou... S&P Global Market Intelligence Inc. [{'key': '48C3E3', 'name': 'S&P Global Market ... 07:26 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
3 2024-01-08 12:32:40+00:00 2B75FE2A0AEC16E6FB5AB80B0AB923C0 2B75FE2A0AEC16E6FB5AB80B0AB923C0-3 Alaska Air Cancels 230 Flights After Boeing Je... 55438C news False Boeing Co. Industrials Aerospace United States BA "The 737-9 MAX grounding has significantly imp... Alaska Air Group Inc. [{'key': 'CF6A5A', 'name': 'Alaska Air Group I... "The 737-9 MAX grounding has significantly imp... [(1, Alaska Air Group Inc.)]
4 2024-01-08 12:34:40+00:00 F1D02F7E0B5DFD7E6676BF455EB66D74 F1D02F7E0B5DFD7E6676BF455EB66D74-1 Seaport Lifts Price Target on NextEra Energy t... 2CB4C9 news False NextEra Energy Inc. Utilities Conventional Electricity United States NEE 07:34 AM EST, 01/08/2024 (MT Newswires) -- Nex... S&P Global Market Intelligence Inc. [{'key': '48C3E3', 'name': 'S&P Global Market ... 07:34 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
In [ ]:
df_sentences_negative.head(5)
Out[ ]:
timestamp_utc document_id sentence_id headline entity_id document_type is_reporting_entity entity_name entity_sector entity_industry entity_country entity_ticker text other_entities entities masked_text other_entities_map
0 2024-01-08 11:25:18+00:00 35168FBB2BC7D51E333525D037E3B48C 35168FBB2BC7D51E333525D037E3B48C-1 Boeing Shares Tumble After Aviation Regulator ... 55438C news False Boeing Co. Industrials Aerospace United States BA 06:25 AM EST, 01/08/2024 (MT Newswires) -- Boe... Alaska Air Group Inc. [{'key': '55438C', 'name': 'Boeing Co.', 'tick... 06:25 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(1, Alaska Air Group Inc.)]
1 2024-01-08 12:23:22+00:00 23E2BED19BC492E6F8AC36949930D292 23E2BED19BC492E6F8AC36949930D292-1 KeyBanc Boosts Price Target on Mastercard to $... 55C9B5 news False Mastercard Inc. Financials Consumer Finance United States MA 07:23 AM EST, 01/08/2024 (MT Newswires) -- Mas... S&P Global Market Intelligence Inc. [{'key': '55C9B5', 'name': 'Mastercard Inc.', ... 07:23 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
2 2024-01-08 12:26:48+00:00 7856CE57B56A7ABDC3E1DBE3B9347B27 7856CE57B56A7ABDC3E1DBE3B9347B27-1 Seaport Boosts Price Target on Southern to $77... 147C38 news False Southern Co. Utilities Conventional Electricity United States SO 07:26 AM EST, 01/08/2024 (MT Newswires) -- Sou... S&P Global Market Intelligence Inc. [{'key': '48C3E3', 'name': 'S&P Global Market ... 07:26 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
3 2024-01-08 12:34:40+00:00 F1D02F7E0B5DFD7E6676BF455EB66D74 F1D02F7E0B5DFD7E6676BF455EB66D74-1 Seaport Lifts Price Target on NextEra Energy t... 2CB4C9 news False NextEra Energy Inc. Utilities Conventional Electricity United States NEE 07:34 AM EST, 01/08/2024 (MT Newswires) -- Nex... S&P Global Market Intelligence Inc. [{'key': '48C3E3', 'name': 'S&P Global Market ... 07:34 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]
4 2024-01-08 12:53:21+00:00 387DFCD9590D70C97BCA7318EC4716E0 387DFCD9590D70C97BCA7318EC4716E0-1 Melius Research Upgrades AMD to Buy From Hold,... 69345C news False Advanced Micro Devices Inc. Technology Semiconductors United States AMD 07:53 AM EST, 01/08/2024 (MT Newswires) -- AMD... S&P Global Market Intelligence Inc. [{'key': '69345C', 'name': 'Advanced Micro Dev... 07:53 AM EST, 01/08/2024 (MT Newswires) -- Tar... [(2, S&P Global Market Intelligence Inc.)]

Label the Results¶

Use an LLM to analyze each document chunk and determine its relevance to the Pricing Power theme or to the Lakc of Pricing Power theme. Any document chunks which aren't explicitly linked to one of these will be filtered out.

In [ ]:
labeler = ScreenerLabeler(llm_model=llm_model)
In [ ]:
df_labels_positive = labeler.get_labels(
    main_theme=pricing_power_theme,
    labels=pricing_power_labels_list,
    texts=df_sentences_positive["masked_text"].tolist(),
)

# Merge and process results for positive pricing power
df_positive = merge(df_sentences_positive, df_labels_positive, left_index=True, right_index=True)
df_positive_relevant = labeler.post_process_dataframe(df_positive)
Querying OpenAI...: 100%|██████████| 5509/5509 [03:51<00:00, 23.84it/s]
In [ ]:
df_labels_negative = labeler.get_labels(
    main_theme=no_pricing_power_theme,
    labels=no_pricing_power_labels_list,
    texts=df_sentences_negative["masked_text"].tolist(),
)

# Merge and process results for negative pricing power
df_negative = merge(df_sentences_negative, df_labels_negative, left_index=True, right_index=True)
df_negative_relevant = labeler.post_process_dataframe(df_negative)
Querying OpenAI...: 100%|██████████| 5107/5107 [03:35<00:00, 23.65it/s]

Visualizations¶

Sector-Based Pricing Power Visualization¶

The following visualizations provide a sector-by-sector breakdown of companies mentioned in pricing power contexts. These charts help identify:

  • Industry Patterns: Which sectors show more pricing power activity
  • Market Leaders: Companies most frequently mentioned in pricing power contexts within each sector
  • Story Context: Detailed hover information reveals the specific headlines, motivations, and news excerpts driving each company's positioning

Each bar represents the frequency of pricing power mentions, with hover details providing the underlying news narrative that shaped each company's pricing power profile.

Companies with Pricing Power¶

This chart displays companies that have been most frequently mentioned in positive pricing power contexts, organized by sector and ranked by total mention volume. The visualization reveals which companies and industries demonstrate strong ability to control prices, raise prices without losing customers, or maintain premium positioning in their markets. Sectors are ordered by their overall pricing power activity, with the most active sectors appearing first.

In [38]:
plot_top_companies_by_sector(df_positive_relevant, min_companies=1, title_suffix="(Pricing Power)", top_sectors=4, interactive=True) #set interactive=True (or False) enable (or disable) the interactive plot

Companies Lacking of Pricing Power¶

This complementary chart shows companies most frequently mentioned in negative pricing power contexts, organized by sector and ranked by total mention volume. It identifies firms struggling with price competition, facing customer resistance to price increases, or operating in commoditized markets where pricing control is limited. Like the positive chart, sectors are ordered by their overall pricing power activity levels.

In [39]:
plot_top_companies_by_sector(df_negative_relevant, min_companies=3, title_suffix="(Lack of Pricing Power)", top_sectors=4, interactive=True) #set interactive=True (or False) enable (or disable) the interactive plot

Pricing Power Confidence Analysis¶

This comprehensive assessment combines both positive and negative pricing power signals to create a confidence-based ranking system. The analysis provides:

  • Total Exposure: Overall volume of pricing power related news coverage for each company
  • Confidence Scoring: Relative proportion of positive versus negative pricing power mentions
  • Relative Ranking: How the top 30 most-mentioned companies compare against each other in terms of pricing power signals

The stacked bar chart shows the percentage breakdown of positive (green) versus negative (red) pricing power mentions, with a reference line at 50%. Companies to the right of the line show predominantly positive pricing power signals, while those to the left face more pricing challenges. The secondary chart on the right shows total mention volume, indicating which companies are most actively discussed in pricing power contexts.

In [40]:
companies_basket = identify_basket_and_plot_confidence(df_positive_relevant, df_negative_relevant, basket_size=30, sector_column='Sector', interactive=True) #set interactive=True (or False) enable (or disable) the interactive plot
In [ ]:
companies_basket.head()
Out[ ]:
Company positive_exp negative_exp total_exposure Sector positive_exp_pct negative_exp_pct headline_positive_exp text_positive_exp motivation_positive_exp headline_negative_exp text_negative_exp motivation_negative_exp
0 Target Corp. 2.0 3.0 5.0 Consumer Services 40.000000 60.000000 Target Likely to Report 'Mid-Single-Digit Comp... "Following a more than 40% rally off the Octob... Target Corp. is mentioned in the context of a ... White House Says Grocery Chains Answer Biden's... 02:58 PM EDT, 05/21/2024 (MT Newswires) -- The... Target Corp. is mentioned in the context of re...
1 Verizon Communications Inc. 4.0 1.0 5.0 Telecommunications 80.000000 20.000000 Verizon Fourth-Quarter Earnings Meet Expectati... "With our vast network coverage and the larges... Verizon Communications Inc. is leveraging its ... Verizon Logs Fewer Postpaid Subscriber Losses ... "Despite taking further pricing action this qu... Verizon Communications Inc. indicates that des...
2 Costco Wholesale Corp. 4.0 2.0 6.0 Consumer Services 66.666667 33.333333 Costco Q2 EPS Likely Offering Limited Upside P... They said Costco's premium valuation is warran... Costco Wholesale Corp. is described as having ... Kroger-Albertsons Proposed Merger Challenged b... "The FTC's decision makes it more likely that ... Costco Wholesale Corp. is mentioned in the con...
3 Coca-Cola Co. 5.0 1.0 6.0 Consumer Goods 83.333333 16.666667 Coca-Cola Tops First-Quarter Expectations, Lif... The top-line outlook "is solely driven by high... Coca-Cola Co. indicates that its top-line outl... Coca-Cola Tops First-Quarter Expectations, Lif... The top-line outlook "is solely driven by high... Coca-Cola Co. is discussing how its top-line o...
4 Mastercard Inc. 2.0 4.0 6.0 Financials 33.333333 66.666667 Top Midday Stories: Intel's Foundry Business S... Mastercard (MA) announced on Wednesday "a few ... Mastercard Inc. is explicitly announcing a pri... Sector Update: Financial The Case-Shiller National Home Price Index fel... Mastercard Inc. is involved in an agreement to...

Temporal Pricing Power Analysis¶

This time-series analysis tracks how pricing power narratives evolve over time for companies in our basket. The weekly analysis reveals:

  • Narrative Trends: How pricing power stories develop and change over time
  • Net Positioning: The balance between positive and negative pricing power mentions over time

Each line represents a company's "net pricing power exposure" (positive mentions minus negative mentions). Points above zero indicate weeks with net positive pricing power signals, while points below zero show weeks with net negative signals. Detailed hover information provides the specific news context driving each data point.

In [41]:
weekly_exposure = analyze_basket_weekly_with_labels(df_positive_relevant, df_negative_relevant, companies_basket, start_date, end_date, 'Sector', interactive=True) #set interactive=True (or False) enable (or disable) the interactive plot

Key Insights and Market Stories¶

The temporal analysis reveals several notable pricing power stories:

PepsiCo's Price Resistance: PepsiCo's price hikes were met with significant resistance from major retailers like Carrefour, which stopped selling PepsiCo products in several European countries. The company experienced declining sales volume in Q1 2024, demonstrating the limits of pricing power when customers have alternatives.

Quick Service Restaurant Challenges: McDonald's and Starbucks faced customer backlash and reduced customer counts due to their price increases, indicating that even strong brands face constraints when pricing exceeds customer willingness to pay, particularly among price-sensitive consumers.

Successful Pricing Power Examples: Spotify demonstrated strong pricing power within the streaming industry, successfully raising subscription prices while justifying increases through improved product offerings and maintaining customer loyalty.

These examples illustrate that pricing power is dynamic and context-dependent, influenced by factors such as brand strength, competitive alternatives, and economic conditions.

Export the Results¶

Export the data as Excel files for further analysis or to share with the team.

In [ ]:
try:
    # Create the Excel manager
    excel_manager = ExcelManager()

    # Define the dataframes and their sheet configurations
    df_args = [
        (df_positive_relevant, "Positive Pricing Power", (0, 0)),
        (df_negative_relevant, "Negative Pricing Power", (0, 0)),
        (companies_basket, "Pricing Power Basket", (2, 4)),
        (weekly_exposure, "Weekly Exposure Analysis", (2, 2))
    ]

    # Save the workbook
    excel_manager.save_workbook(df_args, export_path)

except Exception as e:
    print(f"Warning while exporting to excel: {e}")
In [ ]:
print("Runtime:", datetime.datetime.now() - start)
Runtime: 0:49:43.771132